<?php
/** @var ArticleController $this */
/** @var Article $data */
?>
<div class="view">

    <?php if (!empty($data->title)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('title')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->title); ?>
            </div>
        </div>

    <?php endif; ?>

    <?php if (!empty($data->sort_id)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('sort_id')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->sort_id); ?>
            </div>
        </div>

    <?php endif; ?>

    <div class="field">
        <div class="field_name">
            <b><?php echo CHtml::encode($data->getAttributeLabel('is_active')); ?>:</b>
        </div>
        <div class="field_value">
            <?php echo CHtml::encode($data->is_active == 1 ? 'True' : 'False'); ?>
        </div>
    </div>

    <?php if (!empty($data->created_date)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('created_date')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo Yii::app()->getDateFormatter()->formatDateTime($data->created_date, 'medium', 'medium'); ?>
                <br/>
                <?php echo date('D, d M y H:i:s', strtotime($data->created_date)); ?>
            </div>
        </div>

    <?php endif; ?>

    <?php if (!empty($data->catalog->catalog_name)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('catalog_id')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->catalog->catalog_name); ?>
            </div>
        </div>

    <?php endif; ?>

    <?php if (!empty($data->image->title)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('image_id')); ?>:</b>
            </div>
            <div class="field_value">

<!--                <img src="--><?php //echo $data->image->url?><!--">-->
            </div>
        </div>

    <?php endif; ?>

    <?php if (!empty($data->summary)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('summary')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->summary); ?>
            </div>
        </div>

    <?php endif; ?>


</div>